class EnhancedAIFactory:
    """增强版AI工厂（包含禅镜和闪剪）"""

    def __init__(self):
        self.config = ExtendedAIConfig()
        self.zenmirror = ZenMirrorGenerator(self.config)
        self.flashcut = FlashCutGenerator(self.config)

        # 原有的其他工具
        self.proxy = ModelProxy(self.config)
        self.image_gen = ImageGenerator(self.config)
        self.video_model = VideoModel(self.config)
        self.voice_model = VoiceModel(self.config)

    def create_zenmirror_video(self,
                               script: str,
                               avatar_id: str = "default",
                               **kwargs) -> Dict:
        """创建禅镜数字人视频"""
        return self.zenmirror.create_digital_human(script, avatar_id, **kwargs)

    def create_flashcut_video(self,
                              script: str,
                              media_materials: Optional[List[str]] = None,
                              **kwargs) -> Dict:
        """使用闪剪从脚本生成视频"""
        return self.flashcut.generate_from_script(script, media_materials, **kwargs)

    def auto_edit_with_flashcut(self,
                                video_path: str,
                                edit_style: str = "professional",
                                **kwargs) -> Dict:
        """使用闪剪自动编辑视频"""
        return self.flashcut.auto_edit_video(video_path, edit_style, **kwargs)

    def check_zenmirror_status(self, task_id: str) -> Dict:
        """检查禅镜任务状态"""
        return self.zenmirror.check_task_status(task_id)

    def check_flashcut_status(self, task_id: str) -> Dict:
        """检查闪剪任务状态"""
        return self.flashcut.check_task_status(task_id)

    def get_available_avatars(self) -> List[Dict]:
        """获取可用的数字人形象"""
        return self.zenmirror.get_avatar_list()